#ifndef _H_C_COROUTINE_TIMER_CONTEXT_H_
#define _H_C_COROUTINE_TIMER_CONTEXT_H_

#include "../typedefine.h"
#include "../promise.h"
#include "../timer.h"

namespace TB
{
	class CCoroutineTimerContext: public ITimerContext
	{
	public:
		CCoroutineTimerContext(volatile UINT64* pqwCurTime);
		inline CTimerMgr& GetTimerMgr() { return m_oTimerMgr; }
		virtual DStopTimer StartTimer(UINT64 qwMilliSeconds, const std::function<void()>& cbOnTimer) override;

	private:
		CTimerMgr m_oTimerMgr;
	};
}

#endif
